package com.czn.shopdemo.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @author Zenan Chen
 * @date 2023/4/3 10:10
 */
@Data
@TableName(value = "t_shop_demo_goods")
@EqualsAndHashCode(callSuper = false)
public class Goods extends BaseEntity {

    @ApiModelProperty(value = "商品编码", example = "HUAWEIMATE50")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "商品名称", example = "华为Mate50")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "所属者", example = "华为")
    @TableField("author")
    private String author;

    @ApiModelProperty(value = "发布者", example = "小明")
    @TableField("publisher")
    private String publisher;

    @ApiModelProperty(value = "发布日期", example = "2023-04-03")
    @TableField("publish_date")
    private Date publishDate;

    @ApiModelProperty(value = "价格", example = "6666.66")
    @TableField("price")
    private double price;

    @ApiModelProperty(value = "标签id", example = "f4fe867c193e47e298d0c86a7513fa1c")
    @TableField("category_id")
    private String categoryId;

    @ApiModelProperty(value = "商户id", example = "456",hidden = true)
    @TableField("business_id")
    private String businessId;

    @ApiModelProperty(value = "描述信息", example = "xxxxx")
    @TableField("info")
    private String info;

    @ApiModelProperty(value = "图片地址", example = "http://localhost:8082")
    @TableField("img_url")
    private String imgUrl;

    @ApiModelProperty(value = "商品数量", example = "123123")
    @TableField("num")
    private Long num;

    @ApiModelProperty(value = "是否上线", example = "1")
    @TableField("on_line")
    private String onLine;

    @ApiModelProperty(value = "上线时间", example = "2023-04-03")
    @TableField("on_line_time")
    private Date onLineTime;
}
